/**
 * 2017年9月15日
 */
package exp.util;

import java.io.File;

import org.bytedeco.javacpp.opencv_core.IplImage;
import org.bytedeco.javacpp.opencv_imgcodecs;
import org.opencv.core.Mat;

/**
 * @author Alex
 *
 */
public class CVImageLoader {
	/*private CVImageLoader(){};
	public static Mat loadImage(String filename){
		File f = new File(filename);
		if(f.exists() && f.isFile()){
			return Highgui.imread(f.getAbsolutePath());
		}
		return Highgui.imread(CVImageLoader.class.getClassLoader().getResource(filename).getFile());
	}
	
	public static boolean saveFile(Mat src,String fileName) {
		return Highgui.imwrite(fileName,src);
	}
	public static IplImage loadImageIplImage(String filename){
		File f = new File(filename);
		if(f.exists() && f.isFile()){
			return opencv_imgcodecs.cvLoadImage(f.getAbsolutePath());
		}
		return opencv_imgcodecs.cvLoadImage(CVImageLoader.class.getClassLoader().getResource(filename).getFile());
		
	}*/
	
	
}
